/**
 * Copyright &copy; 2012-2016 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.ems.service;

import java.util.List;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.thinkgem.jeesite.common.persistence.Page;
import com.thinkgem.jeesite.common.service.CrudService;
import com.thinkgem.jeesite.modules.ems.entity.EmsUser;
import com.thinkgem.jeesite.modules.ems.dao.EmsUserDao;

/**
 * 报名人Service
 * @author zad
 * @version 2018-01-25
 */
@Service
@Transactional(readOnly = true)
public class EmsUserService extends CrudService<EmsUserDao, EmsUser> {

	public EmsUser get(String id) {
		return super.get(id);
	}
	
	public List<EmsUser> findList(EmsUser emsUser) {
		return super.findList(emsUser);
	}
	
	public Page<EmsUser> findPage(Page<EmsUser> page, EmsUser emsUser) {
		return super.findPage(page, emsUser);
	}
	
	@Transactional(readOnly = false)
	public void save(EmsUser emsUser) {
		super.save(emsUser);
	}
	
	@Transactional(readOnly = false)
	public void delete(EmsUser emsUser) {
		super.delete(emsUser);
	}
	
	// add by zad 2018-01-31 校验报名人是否重复
	public List<EmsUser> checkExists(EmsUser emsUser)
	{
		return dao.checkExists(emsUser);
	}
	
	// add by zad 2018-02-28 根据用户名查询用户信息
	public EmsUser findUserByLoginName(EmsUser emsUser)
	{
		return dao.findUserByLoginName(emsUser);
	}
}